package com.xr.blog.dao;

import com.xr.blog.pojo.BlogTag;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 标签表
 * 
 * @author XRJ
 * @email 1033835209@qq.com
 * @date 2020-07-07 20:31:38
 */
@Repository
public interface BlogTagMapper extends BaseMapper<BlogTag> {

    /**
     * 查询热门标签
     * @param count 需要查询的数量
     * @return
     */
    List<BlogTag> findHotTags(Integer count);

    /**
     * 查询当前文章的标签
     * @param articleId 文章ID
     * @return
     */
    List<BlogTag> selectTagsByArticleId(Long articleId);
	
}
